home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 49
/
Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso
/
-serious-
/
misc
/
gedeiffel
/
install
< prev
next >
Wrap
Text File
|
1999-11-29
|
6KB
|
217 lines
; $VER: Installer 1.0 (24.1.99)
;
; An Amiga Installer for the SmallEiffel mode for GoldEd
;
; Copyright © 1999 Thomas Aglassinger. All rights reserved.
;----------------------------------------------------------------------------
; Specify minimum installer version
;----------------------------------------------------------------------------
(debug "set version")
(set #minimum-installer-version 43)
(set #minimum-installer-revision 3)
(set #minimum-installer-id
(+ #minimum-installer-revision
(* #minimum-installer-version 65536)
)
)
(debug " minimum-installer-id = " #minimum-installer-id)
(debug " current-installer-id = " @installer-version)
;----------------------------------------------------------------------------
; Setup messages, prompts and help text
;----------------------------------------------------------------------------
(set #message-wrong-installer
(cat "You have an old version of the program 'Installer' on your Amiga!\n\n"
"The installation procedure needs at least Installer "
#minimum-installer-version "." #minimum-installer-revision ".\n\n"
"Please obtain a newer version!\n\n"
"(Check Aminet or "
"the WWW site of the current owner of the rights for Amiga.)"
))
(set #message-welcome
(cat "Welcome to the Amiga Installer for GedEiffel\n\n"
"This will install a SmallEiffel mode for GoldEd. It features a "
"syntax parser, a routine scanner and a toolbar for some common "
"functions."
))
(set #update-registry-manually
(cat "There has been a minor problem:\n\n"
"Because the registry editor has not been installed, the Eiffel "
"filetype could not have been created automatically. Thus, you "
"have to do it manually. However, this is no difficult:\n\n"
"Simply create a new filetype for \"*.e\" and assign all the "
"eiffel.* presets to it.\n\n"
"Refer to the GoldEd manual for details on how to perform these steps."
))
(set #message-exit
(cat "\nThe SmallEiffel mode has been installed.\n\n"
"Please restart GoldEd."
))
(set #message-wrong-golded
(cat "This script requires GoldED 4.7.\n\n"
"If you are using GoldEd 5 or later, download "
"aminet:text/edit/envSOF*.lha"
))
;----------------------------------------------------------------------------
; Check requirements
;----------------------------------------------------------------------------
; Check installer version to piss people off and make them
; download a new one or forget about the whole thing - He he he.
; (The script should work with older versions, but how am I
; supposed to test this?)
;
; After that, check for GoldEd 4.7 to piss off users of GoldEd 5.
(procedure P-check-requirements
(
(debug "check installer version")
(if (< @installer-version #minimum-installer-id)
(
(debug "installer too old")
(abort #message-wrong-installer)
)
)
(debug "check golded version")
(set #golded-installed 0)
(if (exists "GOLDED:" (NOREQ))
(
(set #golded-version (getversion "golded:golded"))
(set #version-high (/ #golded-version 65536))
(set #version-low (- #golded-version (* #version-high 65536)))
(set #version-by-ten (+ (* 10 #version-high) #version-low))
(if (= #version-by-ten 47) (set #golded-installed 1))
)
)
(if (= 0 #golded-installed) (abort #message-wrong-golded))
))
;----------------------------------------------------------------------------
; Welcome user
;----------------------------------------------------------------------------
(procedure P-welcome
(
(debug "welcome")
(welcome #message-welcome)
))
;----------------------------------------------------------------------------
; Copy files
;----------------------------------------------------------------------------
(procedure P-copy-files
(
(debug "copy-files")
(copylib
(prompt "Copy syntax parser")
(source "syntax/eiffel.parser")
(dest "golded:syntax")
(confirm)
(help @copylib-help)
)
(complete 20)
(copylib
(prompt "Copy routine scanner")
(source "scanner/eiffel")
(dest "golded:parser")
(confirm)
(help @copylib-help)
)
(complete 30)
(makedir "golded:tools/eiffel/arexx")
(foreach "tools/eiffel/arexx" "#?"
(copylib
(prompt "Copy ARexx scripts")
(source (tackon "tools/eiffel/arexx" @each-name))
(dest "golded:tools/eiffel/arexx")
(confirm)
(help @copylib-help)
)
)
(complete 40)
(copyfiles
(prompt "Copy manual")
(source "Manual.guide")
(dest "golded:tools/eiffel")
(confirm)
(help @copyfiles-help)
)
(complete 50)
(copyfiles
(prompt "Copy toolbar icons")
(source "toolbar/eiffel")
(dest "golded:toolbar/eiffel")
(confirm)
(all)
(help @copyfiles-help)
)
))
;----------------------------------------------------------------------------
; Copy presets
;----------------------------------------------------------------------------
(procedure P-copy-presets
(
(debug "copy-presets")
(if (exists("golded:tools/regedit/regedit"))
(
(working "Updating registry...")
(run "golded:tools/regedit/regedit script=install.bat")
)
(
(copyfiles
(prompt "Copy eiffel.* presets")
(source "presets")
(dest "golded:presets")
(confirm)
(all)
(help @copyfiles-help)
)
(message #update-registry-manually)
)
)
))
;----------------------------------------------------------------------------
; Exit
;----------------------------------------------------------------------------
(procedure P-exit
(
(debug "exit")
(message (#message-exit) (all))
(exit (quiet))
))
;----------------------------------------------------------------------------
; Do it!
;----------------------------------------------------------------------------
(complete 0) (P-check-requirements)
(complete 0) (P-welcome)
(complete 10) (P-copy-files)
(complete 60) (P-copy-presets)
(complete 100) (P-exit)